#include <stdio.h>
#include <stdlib.h>
#include <string.h>


void reverse_write_byte( int a, FILE * foutput){
	int i;
	for (i = 0; i < 8; i++){
		fputc('0'+a%2,foutput);
		a /= 2;
	}
	fputc('\n',foutput);
}

int main(int argn, char ** args){
    	int n;
    	if ( argn != 2){
		return -1;
	}
	if ( sscanf(args[1], "%d", &n) <= 0 ){
		return -1;
	}
	reverse_write_byte(n,stdout);
	return 0;
}
